<template>
  <div class="person">
    <h1>人员信息</h1>
    <h4>姓名：{{ name }}</h4>
    <h4>年龄：{{ age }}</h4>
    <button @click="showInfo">提示信息</button>
  </div>
</template>

<script>
	export default {
		name: "Person",
		data() {
			return {
				name: "强哥",
				age: 18,
			};
		},
		methods: {
			showInfo() {
				console.log(this);
				alert(this.name + "-" + this.age);
			},
		},
	};
</script>
	
<style>
	.person{
		background-color: orange;
		border: 1px solid black;
	}
</style>